package utils;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HbnUtil {
	 private static SessionFactory sf;
     static{
    	 try {
    		 sf = new Configuration()
			               .configure() 
			               .buildSessionFactory();
		} catch (HibernateException e) {
			 e.printStackTrace();
		}
     }
     public static Session getSession(){
    	 return sf.getCurrentSession();
     }
   }
       
 
